//
//  ActivityDetailViewController.m
//  MyCarsCanFly
//
//  Created by 何东东 on 15/10/4.
//  Copyright © 2015年 何东东. All rights reserved.
//

#import "ActivityDetailViewController.h"

@interface ActivityDetailViewController ()

@property (nonatomic, retain) UIWebView *webView;

@end

@implementation ActivityDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    //返回
    [self skipReturnWithTarget:self];
    
    //bar颜色
    [self navigationbarColor];
}

- (void)viewWillAppear:(BOOL)animated {

        [super viewWillAppear:animated];
        self.navigationController.navigationBarHidden = NO;

    self.webView = [[UIWebView alloc] initWithFrame:self.view.frame];
    self.webView.backgroundColor = [UIColor whiteColor];
    NSString *urlStr = [NSString stringWithFormat:@"%@&themeType=white&network=wifi&deviceType=iOS&type=0&p=1&version=6.1.7&fontSize=normal&cityId=64", self.model.eventLink];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]];
    [self.view addSubview:self.webView];
    [self.webView loadRequest:request];
    
    
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.hidesBottomBarWhenPushed = YES;
    }
    return self;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
